package com.gopay.checkorder.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.gopay.checkorder.dao.BankBcdlOrderDAO;
import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.bis.BisBankBcdlOrder;

/**
 * 银行流水DAO
 * 
 * @BankOrderDAO.java
 * @author liujy
 * @2013-2-5 下午03:29:06 www.gopay.com.cn Inc.All rights reserved.
 */
@Service("bankBcdlOrderDAO")
public class BankBcdlOrderDAOImpl extends BaseDAOImpl<BisBankBcdlOrder, String> implements BankBcdlOrderDAO {

	@Override
	public BisBankBcdlOrder findBankBcdlOrderById(String orderId) {
		
		String hql ="from BisBankBcdlOrder where gopayOutOrderId=:gopayOutOrderId";
		Map<String,Object> param = new HashMap<String,Object>();
		param.put("gopayOutOrderId", orderId);
		List<BisBankBcdlOrder> bankOrders =this.findByHql(hql, param);
		if(bankOrders!=null&&bankOrders.size()!=0){
			return bankOrders.get(0);
		}else{
			return null;
		}
		
	}


}
